package com.admission.model;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Lob;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.admission.listener.AuditableEntity;

//在线咨询
@Entity
@Table(name = "message")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Message extends AuditableEntity {
	public static final String NORMAL = "0";//普通帖
	public static final String QUALITY = "1";//精品
	public static final String REPLYTRUE="1";//已回复
	public static final String REPLYFALSE="0";//未回复
	private String name;// 咨询者名称
	private String comeFrom;// 咨询者来自哪里
	private String content;// 咨询内容
	private String tag;//标识
	private String type;//提问类别
	private String answer;//回复内容
	private String replyTag;//回复标志
	private MessageReply messageReply;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getComeFrom() {
		return comeFrom;
	}

	public void setComeFrom(String comeFrom) {
		this.comeFrom = comeFrom;
	}
	@Lob
	@Basic(fetch = FetchType.LAZY)
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@OneToOne(mappedBy = "message")
	public MessageReply getMessageReply() {
		return messageReply;
	}

	public void setMessageReply(MessageReply messageReply) {
		this.messageReply = messageReply;
	}

	public String getTag() {
		return tag;
	}

	public void setTag(String tag) {
		this.tag = tag;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	@Lob
	@Basic(fetch = FetchType.LAZY)
	public String getAnswer() {
		return answer;
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}

	public String getReplyTag() {
		return replyTag;
	}

	public void setReplyTag(String replyTag) {
		this.replyTag = replyTag;
	}



}
